package com.system.controller.admin;

import com.common.annotation.LogInfo;
import com.core.system.domain.Dict;
import com.system.service.DictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/dict")
@Api(value = "后台字典表会员控制层",tags = {"后台字典表会员控制层"})
@LogInfo
public class DictExController {

    @Autowired
    private DictService dictService;


    @ApiOperation("字典树加载接口")
    @GetMapping("/tree")
    @PreAuthorize("hasAnyAuthority(@servletUtils.getUrl)")
    public ResponseEntity load_tree(Dict dict){
        return dictService.loadTree(dict);
    }


}
